Skip to content

Conversation

copybara-service[bot]
Copy link

Convert IFRT's kString dtype to NumPy's variable length string dtype.

Previously, xla::ifrt::DType::kString would be translated to
NPY_OBJECT. NumPy 2.0 has introduced a variable length string type,
NPY_VSTRING, so convert to that when available. This is consistent
with xla::DtypeToIfRtDType, which performs the opposite translation.

Previously, `xla::ifrt::DType::kString` would be translated to
`NPY_OBJECT`. NumPy 2.0 has introduced a variable length string type,
`NPY_VSTRING`, so convert to that when available. This is consistent
with `xla::DtypeToIfRtDType`, which performs the opposite translation.

PiperOrigin-RevId: 813472617
@copybara-service copybara-service bot closed this Oct 9, 2025
@copybara-service copybara-service bot deleted the test_813472617 branch October 9, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant